﻿Imports Arsenic

<AttributeUsage(AttributeTargets.Field)>
Public Class TagFieldAttribute
    Inherits Attribute
    Public Enum FieldType As SByte
        Float1 = 0
        Float2 = 1
        Float3 = 2
        Float4 = 3
        Int1 = 4
        Int2 = 5
        Int3 = 6
        Int4 = 7
        [String] = 8
        [Char] = 9
        TagReference = 10
        Block = 11
        BspVertexDataHeader = 12
        ModelIndexBlock = 13
        ModelVertexBlock = 14
        BitmapDataBlock = 15
        SoundDataBlock = 16
        [Enum] = 17
        CharFlags = 18
        WordFlags = 19
        DWordFlags = 20
        Explanation = 21
        Prestructure = 22 ' count, zeros, unknown, offset, zeros
        Short1 = 23
        Short2 = 24
        Short3 = 25
        Short4 = 26
        SelfReference = 27
        BspUncompressedVertexBlock = 28
        BspCompressedVertexBlock = 29
        ScriptData = 30
        BitmapPixelData = 31
        Padding = -1
    End Enum
    Private _OriginalName As String
    Private _Length As Integer
    Private _Type As FieldType

    Public Property Length As Integer
        Get
            Return _Length
        End Get
        Set(value As Integer)
            _Length = value
        End Set
    End Property

    Public Property OriginalName As String
        Get
            Return _OriginalName
        End Get
        Set(value As String)
            _OriginalName = value
        End Set
    End Property

    Public Property Type As FieldType
        Get
            Return _Type
        End Get
        Set(value As FieldType)
            _Type = value
        End Set
    End Property

    Sub New(ByVal name As String, ByVal length As Integer, type As FieldType)
        _Length = length
        _OriginalName = name
        _Type = type
    End Sub
End Class
